package com.example.stu1.student.controller;

import com.example.stu1.student.pojo.Student;
import com.example.stu1.student.service.StudentService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/student")
public class StudentController {
    @Resource
    private StudentService service;

    @RequestMapping("/query")
    public Student query(Integer sno) {
        return service.query(sno);
    }

    @RequestMapping("/update")
    public void update(Student student) {
        service.update(student);
    }
}
